<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use DB;
use Session;
// use Hash;
// use App\Http\Requests\IndexController;

class ShareController extends Controller
{
    //主页展示
    public static function share()
    {
        $session = session('uid');
         $share = DB::table('userdetail')
        ->where('uid',$session)
        ->first();
        return view('home/share/potershare',['share'=>$share]);
    }

    /**
     * 尾部友情链接数据共享
     * $firend 友情链接信息
     * 
     * @return $firend
     */
    public static function firend()
    {
    	//数据库读取友情链接信息
         $firend = DB::table('firendlink')->get();
         // dd($firend);
         //返回到共享页
        return view('home/share/firend',['firend'=>$firend]);
    }

    
}
